import { fetch } from './http';

export const getPlayerList = params => fetch('/api/player/list', { ...params }, 'POST');
export const getAllPlayerNames = params => fetch('/api/player/allNames', { ...params }, 'POST');
export const getAllPlayerClasses = params => fetch('/api/player/allClasses', { ...params }, 'POST');
export const playerExists = params => fetch('/api/player/playerExists', { ...params }, 'POST');
export const createPlayer = params => fetch('/api/manage/createPlayer', { ...params }, 'POST');
export const modifyPlayer = params => fetch('/api/manage/modifyPlayer', { ...params }, 'POST');
export const modifyDkp = params => fetch('/api/manage/modifyDkp', { ...params }, 'POST');
export const getDkpLog = params => fetch('/api/log/list', { ...params }, 'POST');
export const getRaidList = params => fetch('/api/raid/list', { ...params }, 'POST');
export const getRaidDetail = params => fetch('/api/raid/detail', { ...params }, 'POST');
export const importDkpData = params => fetch('/api/manage/importDkpData', { ...params }, 'POST');
export const getRaidSource = params => fetch('/api/raid/getSource', { ...params }, 'POST');
export const saveToFile = params => fetch('/api/manage/saveToFile', { ...params}, 'POST');
export const backupList = params => fetch('/api/manage/backupList', { ...params}, 'POST');
export const backup = params => fetch('/api/manage/backup', { ...params}, 'POST');
export const restore = params => fetch('/api/manage/restore', { ...params}, 'POST');
export const removePlayer = params => fetch('/api/manage/removePlayer', { ...params}, 'POST');
export const getBoardMsg = params => fetch('/api/manage/getBoardMsg', { ...params}, 'POST');
export const setBoardMsg = params => fetch('/api/manage/setBoardMsg', { ...params}, 'POST');
export const adminList = params => fetch('/api/manage/adminList', { ...params}, 'POST');
export const adminSetLevel = params => fetch('/api/manage/adminSetLevel', { ...params}, 'POST');
export const adminResetPwd = params => fetch('/api/manage/adminResetPwd', { ...params}, 'POST');
export const adminChangePwd = params => fetch('/api/manage/adminChangePwd', { ...params}, 'POST');
export const adminRemove = params => fetch('/api/manage/adminRemove', { ...params}, 'POST');
export const adminAdd = params => fetch('/api/manage/adminAdd', { ...params}, 'POST');
export const itemDetail = params => fetch('/api/player/itemDetail', { ...params}, 'GET', {withMask:false});
export const regAcc = params => fetch('/api/player/regAcc', { ...params}, 'POST');
export const gameAccountList = params => fetch('/api/player/gameAccountList', { ...params}, 'POST');
export const gameAccountResetPwd = params => fetch('/api/manage/gameAccountResetPwd', { ...params}, 'POST');

export const login = params => fetch('/api/manage/login', { ...params }, 'POST');
